package edu.study.user.api;

import java.util.List;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import edu.study.api.common.dto.BaseRespDto;
import edu.study.api.common.dto.PageRespDto;
import edu.study.api.common.dto.RespDto;
import edu.study.user.api.dto.AuthAndSubDto;
import edu.study.user.api.dto.AuthDto;
import edu.study.user.api.req.auth.AddAuthReq;
import edu.study.user.api.req.auth.DeleteAuthReq;
import edu.study.user.api.req.auth.ModifyAuthReq;
import edu.study.user.api.req.auth.ModifyAuthStatusReq;
import edu.study.user.api.req.auth.QueryAuthPageListReq;
import edu.study.user.api.req.auth.QueryAuthReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 1.要么没有入参，要么封装成req对象
 * 2.返回类型：BaseRespDto RespDto<T> PageRespDto<T> 三种
 */
@RequestMapping("/api/user/authApi")
@Api(value = "/api/user/authApi", tags = { "权限相关接口-1.0" })
public interface AuthApi {
	
    @ApiOperation(value = "新增权限")
    @RequestMapping(value = "addAuth", method = {RequestMethod.POST})
    BaseRespDto addAuth(@RequestBody AddAuthReq req);
    
    @ApiOperation(value = "删除权限")
    @RequestMapping(value = "deleteAuth", method = {RequestMethod.POST})
    BaseRespDto deleteAuth(@RequestBody DeleteAuthReq req);
    
    @ApiOperation(value = "修改权限")
    @RequestMapping(value = "modifyAuth", method = {RequestMethod.POST})
    BaseRespDto modifyAuth(@RequestBody ModifyAuthReq req);
    
    @ApiOperation(value = "失效/生效")
    @RequestMapping(value = "modifyAuthStatus", method = {RequestMethod.POST})
    BaseRespDto modifyAuthStatus(@RequestBody ModifyAuthStatusReq req);
    
    @ApiOperation(value = "查询权限")
    @RequestMapping(value = "queryAuth", method = {RequestMethod.POST})
    RespDto<AuthDto> queryAuth(@RequestBody QueryAuthReq req);
    
    @ApiOperation(value = "分页查询权限")
    @RequestMapping(value = "queryAuthPageList", method = {RequestMethod.POST})
    PageRespDto<AuthAndSubDto> queryAuthPageList(@RequestBody QueryAuthPageListReq req);
    
    @ApiOperation(value = "查询权限及其子权限列表")
    @RequestMapping(value = "queryAuthAndSubList", method = {RequestMethod.POST})
    RespDto<List<AuthDto>> queryAuthAndSubList(@RequestBody QueryAuthReq req);
    
    @ApiOperation(value = "查询权限及其子权限")
    @RequestMapping(value = "queryAuthAndSub", method = {RequestMethod.POST})
    RespDto<AuthAndSubDto> queryAuthAndSub(@RequestBody QueryAuthReq req);
}
